package personal.leil.learning.digraph;

/**
 * 图钟的一条边
 * <p>
 * <i>如果是无向，则只需要A->B，B->A即可</i>
 * </p>
 *
 * @author Leil
 * @version 1.0
 * @since 2024-1-22
 */
public class Edge {

    /**
     * 边的权重
     */
    public int weight;

    /**
     * 来向节点
     */
    public Node from;

    /**
     * 去向节点
     */
    public Node to;

    public Edge(int weight, Node from, Node to) {
        this.weight = weight;
        this.from = from;
        this.to = to;
    }

}
